package cn.edu.dgut.kk;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
//告诉Spring容器扫描哪些包路径
@ComponentScan
public class Config {

    @Bean("customerBean")
    public Customer createCustomer() {
        Customer customer = new Customer();
        customer.setName("kk");
        return customer;
    }

}
